package org.fjsei.yewu.entity.fjtj;

import lombok.*;

import jakarta.persistence.*;
import org.fjsei.yewu.filter.Node;

import java.util.UUID;

//旧平台 部门表。

//@Table(name = "TB_USER_INFO",  schema="HRUSER",   HRUSER.TB_DEPT_INFO
//不能加@Table( schema="HRUSER",
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "TB_DEPT_INFO",
        uniqueConstraints={@UniqueConstraint(columnNames={"DEPT_ID"})} )
@Builder(toBuilder=true)
public class HrDeptinfo implements Node<Long> {
    @Id
    @Column(name = "id", insertable=false, updatable=false)
    private Long id;
    private String  DEPT_NAME;
    private Long    status;
    private String  DEPT_PRINC;
    private Long    deptLevel;
    private Long    parentId;

    private String  AREA_COD;
    private Short   JC_AREA_COD;
    private Boolean  IF_LHCHK;
    private String  DEPT_ADD;
    private String  ORGCOD;
    private String  REP_COD_TAG;
    private String  DEPT_TEL;
    //.fjtj .seipf .incp不同Schema用户库的=跨数据库了！！ 不能做关联，不能直接上不是本数据库的 Entity模型，JPA只能针对单一个数据库等于CRDB:Cluster底下某个特定的Database概念。
    private UUID division;

   // private Division division;     //本平台的Unit底下的部门ID
/*    @ManyToOne(fetch= FetchType.LAZY)
    @JoinColumn
    private Division  dep;*/

}

